package com.mchsdk.paysdk.config;

import android.text.TextUtils;

import com.mchsdk.open.MCApiFactory;
import com.mchsdk.paysdk.bean.InitModel;
import com.mchsdk.paysdk.utils.FileUtil;
import com.mchsdk.paysdk.utils.MCLog;

public class MCHConstant {

    private static final String TAG = "MCHConstant";

    /**
     * 1登陆Url
     */
    private String platformUserLoginUrl = "";

    /**
     * 2普通注册Url
     */
    private String platformUserRegisterUrl = "";
    /**
     * 2普通注册Url
     */
    private String platformUserPhoneRegisterUrl = "";

    /**
     * 3获取订单信息
     */
    private String goodsOrderInfoUrl = "";

    /**
     * 4支付宝回调
     */
    // private String zfbCallbackUrl = "";

    /**
     * 5 支付宝订单验证
     */
    private String zfbVerificationOrderUrl = "";

    /**
     * 6 微信支付请求
     */
    // private String wxVerificationOrderUrl = "";

    /**
     * 7平台币支付
     */
    private String ptbPayOrderUrl = "";

    /**
     * 8平台币支付
     */
    // private String bindPtbPayOrderUrl = "";

    /**
     * 9支付之后验证
     */
    private String payResultVerificationUrl = "";

    /**
     * 10通知游戏后台支付成功
     */
    private String noticeGamePaySuccess = "";

    /**
     * 11修改密码
     */
    // private String userModifyPassword = "";
    /**
     * 12获得手机验证码
     */
    private String verifyPhoneCodeUrl;
    /**
     * 13手机号注册
     */
    // private String platformPhoneRegisterUrl = "";
    /**
     * 14用户在该游戏中的礼包列表
     */
    private String gamePacksList;

    /**
     * 游戏礼包码
     */
    private String packsCodeUrl;

    /**
     * 15用户信息
     */
    private String userInfoUrl;

    /**
     * 16 绑定手机
     */
    private String updateUserInfoUrl;

    /**
     * 解绑手机
     */
    private String userUnBindPhoneUrl;

    /**
     * 验证手机验证码
     */
    private String checkPhoneCode;
    /**
     * 17忘记密码
     */
    private String forgmentPasswordUrl;
    /**
     * 19平台币充值结果通知
     */
    private String noticeAddPTBUrl = "";

    /**
     * 20平台币充值记录
     */
    private String addPTBRecordURL = "";
    /**
     * 常见问题和解决办法
     */
    private String commonProblem = "";
    /**
     * 问答列表
     */
    private String problemFeedback = "";
    /**
     * 获取用户平台币
     */
    private String queryUserPTBUrl = "";

    /**
     * 威富通请求订单
     */
    private String wftOrderInfoUrl = "";
    /**
     * 微信支付接口
     */
    private String wxPayUrl = "";
    /**
     * 游戏充值记录
     */

    private String gameRecodeUrl = "";
    /**
     * 绑定游戏充值记录
     */
    private String gameRecodeUrl_b = "";
    /**
     * 获得开通哪些支付方式
     */
    private String showPayTypeUrl = "";
    /**
     * 微信登錄之前獲得wxappid
     */
    private String put_appidUrl = "";
    /**
     * 威信第三方授權之後返送code
     */
    private String get_code = "";
    /**
     * 微信地方放授权登录
     */
    private String userWxLoginUrl;

    /**
     * 获取折扣 首冲 续冲
     */
    private String userDiscountUrl;

    /**
     * 获取折扣 首冲 续冲
     */
    private String thirdLoginTypeUrl;

    /**
     * 修改玩家等级和用户名
     */
    private String changeLevelNameUrl;

    /**
     * logo
     */
    private String downloadLogoUrl;
    /**
     * 微信商户id
     */
    public String wxShopId;

    /**
     * 验签字符串
     */
    private String MCHKEY;

    private String ipAddress;
    private String certificate;


    private String jftOrderInfoUrl;

    private String hfbOrderInfoUrl;
    //获得第三方登录需要的参数，qqappid等
    private String thirdloginUrl;
    //第三方登录请求
    private String thirdloginrequest;

    //用户注册协议链接
    private String UserAgreementUrl;

    //根据用户uid获取该用户是否实名
    private String antiAddictionUrl;
    //下线通知
    private String offlineAnnouceUrl;

    //威富通wap支付
    private String wftWapPayUrl;

    //获取微信官方支付结果
    private String wxPayResultUrl;
    /**
     * 上传角色
     */
    private String uploadRoleUrl = "";
    private static MCHConstant instance;

    public static MCHConstant getInstance() {
        if (null == instance) {
            instance = new MCHConstant();
        }
        return instance;
    }

    private MCHConstant() {
    }

    public void initUrlInfo() {
        initSDKChannelUrl();
    }

    public void initSDKChannelUrl() {
        platformUserLoginUrl = ipAddress + "User/user_login";//
        platformUserRegisterUrl = ipAddress + "User/user_register";//
        platformUserPhoneRegisterUrl = ipAddress + "User/user_phone_register";//
        zfbVerificationOrderUrl = ipAddress + "Pay/alipay_pay";//
        ptbPayOrderUrl = ipAddress + "Pay/platform_coin_pay";//
        queryUserPTBUrl = ipAddress + "User/user_platform_coin";//
        gamePacksList = ipAddress + "GameGift/gift_list";// 获得礼包列表
        packsCodeUrl = ipAddress + "GameGift/receive_gift";// 领取礼包
        userInfoUrl = ipAddress + "User/user_info";//
        verifyPhoneCodeUrl = ipAddress + "user/send_sms";//
        updateUserInfoUrl = ipAddress + "User/user_update_data";//
        checkPhoneCode = ipAddress + "User/verify_sms";
        forgmentPasswordUrl = ipAddress + "User/forget_password";//
        hfbOrderInfoUrl = ipAddress + "pay/heepay_pay";//汇付宝订单很支付请求
        jftOrderInfoUrl = ipAddress + "pay/jft_pay";//赵超写的俊付通接口
        addPTBRecordURL = ipAddress + "User/user_deposit_record";// 解绑手机
        userUnBindPhoneUrl = ipAddress + "User/user_phone_unbind";
        wftOrderInfoUrl = ipAddress + "Pay/outher_pay";// 微付通订单信息
        wxPayUrl = ipAddress + "pay/wx_pay";
        payResultVerificationUrl = ipAddress + "Pay/pay_validation";// 支付验证
        noticeGamePaySuccess = ipAddress + "GameNotify/game_pay_notify";// 支付成功通知后台
        /** 非绑定消费 */
        gameRecodeUrl = ipAddress + "Spend/spend_recond_list";
        /** 绑定消费 */
        gameRecodeUrl_b = ipAddress + "Spend/bind_spend_recond_list";
        commonProblem = ipAddress + "user/get_problem";
        problemFeedback = ipAddress + "user/get_question";
        showPayTypeUrl = ipAddress + "user/get_pay_server";
        get_code = ipAddress + "user/get_code";
        userWxLoginUrl = ipAddress + "user/wx_login";
        put_appidUrl = ipAddress + "user/put_appid";
        //安卓SDK客户端向SDK服务器请求获得客户端第三方登录需要的参数
        thirdloginUrl = ipAddress + "user/oauth_param";
        thirdloginrequest = ipAddress + "user/oauth_login";
        userDiscountUrl = ipAddress + "user/get_user_discount";
        thirdLoginTypeUrl = ipAddress + "User/thirdparty";

        UserAgreementUrl = ipAddress.substring(0, ipAddress.indexOf("sdk.php/"))
                + "media.php?s=/Article/agreement.html";
        changeLevelNameUrl = ipAddress + "user/update_user_play";
        downloadLogoUrl = ipAddress.substring(0, ipAddress.indexOf("sdk.php/")) + "Public/Sdk/logo.png";
        certificate = ipAddress + "user/idcard_change";//实名认证
        antiAddictionUrl = ipAddress + "user/return_age";
        offlineAnnouceUrl = ipAddress + "user/get_down_time";
        wftWapPayUrl = ipAddress + "WapPay/weixin_pay";
        uploadRoleUrl = ipAddress + "User/save_user_play_info";//上传角色
        wxPayResultUrl = ipAddress + "WapPay/get_orderno_restart";
    }

    public String getCertificate() {
        return certificate;
    }

    public String getOfflineAnnouceUrl() {
        return offlineAnnouceUrl;
    }

    public String getUserWxLoginUrl() {
        return userWxLoginUrl;
    }

    public String getPut_appidUrl() {
        return put_appidUrl;
    }

    public String getGet_code() {
        return get_code;
    }

    public String getPlatformUserLoginUrl() {
        return platformUserLoginUrl;
    }

    public String getChangeLevelNameUrl() {
        return changeLevelNameUrl;
    }

    public String getPlatformUserRegisterUrl() {
        return platformUserRegisterUrl;
    }

    public String getGoodsOrderInfoUrl() {
        return goodsOrderInfoUrl;
    }


    public String getZfbVerificationOrderUrl() {
        return zfbVerificationOrderUrl;
    }

    public String getPtbPayOrderUrl() {
        return ptbPayOrderUrl;
    }

    public String getPayResultVerificationUrl() {
        return payResultVerificationUrl;
    }

    public String getNoticeGamePaySuccess() {
        return noticeGamePaySuccess;
    }

    public String getWxShopId() {
        return wxShopId;
    }

    public String getGamePacksList() {
        return gamePacksList;
    }

    public String getUserInfoUrl() {
        return userInfoUrl;
    }

    public String getAntiAddictionUrl() {
        return antiAddictionUrl;
    }

    public String getVerifyPhoneCodeUrl() {
        return verifyPhoneCodeUrl;
    }

    public String getUpdateUserInfoUrl() {
        return updateUserInfoUrl;
    }

    public String getForgmentPasswordUrl() {
        return forgmentPasswordUrl;
    }

    public String getNoticeAddPTBUrl() {
        return noticeAddPTBUrl;
    }

    public String getAddPTBRecordURL() {
        return addPTBRecordURL;
    }

    public String getMCHKEY() {
        return MCHKEY;
    }

    public String getQueryUserPTBUrl() {
        return queryUserPTBUrl;
    }

    public String getPlatformUserPhoneRegisterUrl() {
        return platformUserPhoneRegisterUrl;
    }

    public String getWftOrderInfoUrl() {
        return wftOrderInfoUrl;
    }

    public String getWxPayUrl() {
        return wxPayUrl;
    }

    public String getPacksCodeUrl() {
        return packsCodeUrl;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    public void setMCHKEY(String mCHKEY) {
        MCHKEY = mCHKEY;
    }

    public String getUserUnBindPhoneUrl() {
        return this.userUnBindPhoneUrl;
    }

    public String getGameRecodeUrl() {
        return gameRecodeUrl;
    }

    public String getUserDiscountUrl() {
        return userDiscountUrl;
    }

    public String getJftOrderInfoUrl() {
        return jftOrderInfoUrl;
    }

    public String getProblemFeedback() {
        return this.problemFeedback;
    }

    public String getCommonProblem() {
        return this.commonProblem;
    }

    public String getShowPayTypeUrl() {
        return showPayTypeUrl;
    }

    public String getHfbOrderInfoUrl() {
        return hfbOrderInfoUrl;
    }

    public String getThirdloginUrl() {
        return thirdloginUrl;
    }

    public String getThirdloginrequest() {
        return thirdloginrequest;
    }

    public String getThirdLoginTypeUrl() {
        return thirdLoginTypeUrl;
    }

    public String getUserAgreementUrl() {
        return UserAgreementUrl;
    }

    public String getDownloadLogoUrl() {
        return downloadLogoUrl;
    }

    public String getWftWapPayUrl() {
        return wftWapPayUrl;
    }

    public String getCheckPhoneCode()

    {
        return checkPhoneCode;
    }

    public String getUploadRoleUrl() {
        return uploadRoleUrl;
    }

    public String getWxPayResultUrl() {
        return wxPayResultUrl;
    }

}
